package main

import (
	"fmt"
	"strings"
)

// func triangle() {
// 	sli := make([]int, 0, 12)
// 	for i := 1; i <= 12; i++ {
// 		sli = append(sli, i)
// 		for j := len(sli); j > 0; j-- {
// 			fmt.Printf("%2v ", sli[j-1])
// 		}
// 		fmt.Print("\n")
// 	}
// }

func triangle(n int) {
	sli := make([]int, 0, n)
	for i := n; i > 0; i-- {
		sli = append(sli, i)
	}
	fmt.Println(sli)
	for j := len(sli); j > 0; j-- {
		str1 := fmt.Sprintf("%v", sli[j-1:])
		str2 := fmt.Sprintf("%v\n", strings.ReplaceAll(str1, "[", ""))
		str3 := fmt.Sprintf("%v\n", strings.ReplaceAll(str2, "]", ""))
		fmt.Printf("%100v", str3)
	}
}
